import adminConfig from '@/admin.config.js'
export default {
  namespaced: true,
  state: {},
  getters: {},
  mutations: {},
  actions: {
    list(_, data) {
      return uni.request({
        url: "/unify/api/index",
        data
      })
    },
    form(_, data = {}) {
      return uni.request({
        url: "/unify/api/form",
        data,
      })
    },
    sync() {
      return uni.request({
        url: `/unify/api/sync`,
      })
    },
    save(_, data = {}) {
      return uni.request({
        url: `/unify/api/${data.id?'update':'save'}`,
        data
      })
    },
    delete(_, data) {
      return uni.request({
        url: "/unify/api/delete",
        data
      })
    },
    updateField(_, data) {
      return uni.request({
        url: `/unify/api/updateField`,
        data
      })
    },
    exportJSON(){
      return uni.request({
        url: `/unify/api/exportJSON`
        
      })
    }
  }
}